/*
 * @Copyright: 2025 Copyright (C) AMCAX, All rights reserved.
 * @Author: Zhang
 * @Date: 2025/7/24 19:39
 * @LastEditTime: 2025/7/24 19:39
 * @LastEditors: Zhang
 * @Description:
 */

import { ICommandLayout, TCmdGroup } from '@/components/types';
import { FeatureManager } from '@amcax/base';
import { CmdButton, CmdSplitButton } from '@/components/CmdBar/CmdButtons';
import { Flex } from 'antd';
import { cmdJoinProjection,  cmdGeodesicLine, cmdTrajectories, cmdCurveOptimization, cmdBoundaryOptimization } from '@/commands/modelRouting'
const EditLayout = () => {
  return (
    <Flex>
      {FeatureManager.isFeatureEnabled('cmd-join-projection') && (
        <CmdButton cmd={cmdJoinProjection} />
      )}
      {FeatureManager.isFeatureEnabled('cmd-geodesic-line') && (
          <CmdButton cmd={cmdGeodesicLine} />
      )}
      {FeatureManager.isFeatureEnabled('cmd-trajectories') && (
          <CmdButton cmd={cmdTrajectories} />
      )}
      {FeatureManager.isFeatureEnabled('cmd-curve-optimization') && (
          <CmdButton cmd={cmdCurveOptimization} />
      )}
      {FeatureManager.isFeatureEnabled('cmd-boundary-optimization') && (
          <CmdButton cmd={cmdBoundaryOptimization} />
      )}
    </Flex>
  );
};

const cmdGroups: TCmdGroup[] = [
  {
    id: 'draw',
    label: '编辑',
    layout: <EditLayout />,
    visible: true,
  },
];

export const modelRouting: ICommandLayout = {
  id: 'modelRouting',
  label: '模型布线',
  cmds: cmdGroups,
};
